<?php if($order_product_items){ ?>
<table class="admindata">
    <thead>
     
        <tr class="head_tb">
            <th style="width: 100px;">Mã SP</th>
            <th width="">Tên sản phẩm</th>
            <th style="width: 50px;">Số lượng</th>
             <th style="width: 50px;">Màu sắc</th>
             <th style="width: 50px;">Kích thước</th>
            <th style="width: 80px;">Giá</th>
            <th style="width: 80px;">Thành tiền</th>
            <th class="publish" style="width: 60px;">Hành động</th>
        </tr>                
    </thead>
        <tbody>
         <?php
		 $tongtien = 0;
		  foreach($order_product_items as $product_item){ ?>
        <tr class="row1">
            <td>
            <img src="<?php echo base_url_site()?>uploads/products/avatar/<?php echo $product_item->image?>" width="100" />
            </td>
            <td>
            <?php echo $product_item->product_name?>               
            </td>
            <td>
            <?php echo $product_item->quantity; ?>
            </td>
             <td>
            <?php echo $product_item->color_name; ?>
            </td>
             <td>
            <?php echo $product_item->size_name; ?>
            </td>
            <td>
            <?php echo number_format($product_item->price, 0, ',', '.')?>
           </td>
            <td>
            <?php echo number_format($product_item->total, 0, ',', '.')?>
            </td>
            <td>
            <a href="javascript:void(0);" data-url="<?php echo base_url()?>orders/delete_order_product/<?php echo $product_item->order_product_id?>" title="Sửa" class="del_order_product"><img src="<?php echo base_url()?>templates/icon/del.png"></a>
            </td>
        </tr>
        
        <?php 
			$tongtien +=$product_item->total;
		} ?>
        <tr>
        	<td colspan="6">
             <div style=" float:left;text-align:left; font-size:16px; color:#F00; font-weight:bold; "><span>Ghi chú : <?php echo $orderItem->note;?> </span> </div>
            </td>
        </tr>
        <tr>
        	<td colspan="6">
             <div style=" float:right;text-align:right; font-size:16px; color:#F00; font-weight:bold; "><span>Tổng tiền : </span>  <?php echo number_format($tongtien, 0, ',', '.')?> VNĐ</div>
            </td>
        </tr>
        </tbody>
</table>  
<?php } ?>